package com.mercycrazy.recruit.util.tencent;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 腾讯云资源映射 POJO
 *
 * @author <a href="mailto:1443424326@qq.com">cscamp</a>
 * @since 2022-11-07
 */
@Data
@Component
@PropertySource(value = "classpath:tencent-cloud.properties", encoding = "UTF-8")
@ConfigurationProperties(prefix = "tencent.cloud")
public class TencentCloudProperties {

    private String secretId;
    private String secretKey;
    private final SmsProperties sms = new SmsProperties();

    @Data
    @NoArgsConstructor
    public static class SmsProperties {
        // 短信应用ID: 短信SdkAppId在 [短信控制台] 添加应用后生成的实际SdkAppId
        private String sdkAppId;
        // 签名
        private String signName;
        // 模板id：必须填写已审核通过的模板 ID。模板ID可登录 [短信控制台] 查看
        private String templateId;
    }
}
